
import axios from 'axios'
import bcrypt from 'bcryptjs'

function generaterToken() {
    let time = new Date()
    let string = 'mojo' + Math.round(time/3600)
    let salt = bcrypt.genSaltSync(10);
    let fuck = bcrypt.hashSync(string, salt);
    return fuck;
}

let api = axios.create({
    baseURL: 'http://www.mojotv.cn/',
    timeout: 1000,
    //headers: {'X-Custom-Header': 'foobar'}
});
//api.defaults.headers.common['Authorization'] = generaterToken();

export {api};